home *** CD-ROM | disk | FTP | other *** search
/ Freelog 22 / freelog 22.iso / Prog / Djgpp / GPC2952B.ZIP / doc / gpc / docdemos / mkdirdemo.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2001-02-09  |  300 b   |  14 lines

  1. program MkDirDemo;
  2. var
  3.   Foo: String (127);
  4. begin
  5.   WriteLn ('Enter directory name to create:');
  6.   ReadLn (Foo);
  7.   {$I-}  { Don't abort program on error }
  8.   MkDir (Foo);
  9.   if IOResult <> 0 then
  10.     WriteLn ('Directory `', Foo, ''' could not be created')
  11.   else
  12.     WriteLn ('Okay')
  13. end.
  14.